home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2866 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  932 b 

  1. Path: colossus.holonet.net!russell
  2. From: russell@news.mdli.com (Russell Blackadar)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help- pointers to functions
  5. Date: 20 Jan 1996 03:44:40 GMT
  6. Organization: HoloNet National Internet Access System: 510-704-1058/modem
  7. Distribution: world
  8. Message-ID: <4dpof8$ejt@colossus.holonet.net>
  9. References: <4djcn5$hfe@matrix.mdn.com> <NITIN.96Jan19100526@more.eng.sun.com>
  10. NNTP-Posting-Host: jubal.mdli.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Nitin More [CONTRACTOR] (nitin@more.eng.sun.com) wrote:
  14.  
  15. : typedef int (*FunctionType)(const char *str);
  16.  
  17. : Here you have defined a new type called FunctionType which is a pointer to a
  18. : function which takes const char* as an argument and returns an int.  Now you
  19. : can define the array as follows:
  20.  
  21. : FunctionType *functionArray[100];
  22.  
  23. Well, not quite -- you need to omit the "*" because it's already
  24. in your typedef.
  25.  
  26. --
  27. Russell Blackadar,   russell@mdli.com
  28.